package bg.btanev.eightyfour.shared.dto.experience;

import bg.btanev.eightyfour.shared.dto.dtobase.DomainDtoEntity;
import bg.btanev.eightyfour.shared.dto.experience.institution.InstitutionDto;
import bg.btanev.eightyfour.shared.dto.person.PersonDto;

/**
 *
 * @author B.Tanev
 *
 * @param <EI>
 */
public abstract class ExperienceDto<EI extends InstitutionDto> extends DomainDtoEntity<Long> implements
		Comparable<ExperienceDto<EI>> {

	private ExperiencePeriodDto period; // component
	private EI institution; // many-to-one

	private PersonDto person; // reference to parent Person

	protected ExperienceDto() {
		super();
	}

	@Override
	public int compareTo(ExperienceDto<EI> o) {
		return this.period.compareTo(o.period);
	}
}
